package com.jde.parent.exception;


import com.jde.parent.result.ResultInterface;

/**
 * @description: 非运行时异常 <br>
 * @date: 2019/8/29 17:28 <br>
 * @author: jiangde <br>
 * @version: 1.0 <br>
 */
public class ApplicationException extends Exception implements ResultInterface {

    private int code;
    private String msg;

    public ApplicationException(ResultInterface resultInterface) {
        super(resultInterface.msg());
        this.code = resultInterface.code();
        this.msg = resultInterface.msg();
    }


    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
